package cn.lysj.framework.elm.base;

import cn.lysj.framework.base.BaseContent;
import cn.lysj.framework.elm.service.*;
import cn.lysj.framework.pirpraph.repository.FoodReportRepository;
import eleme.openapi.sdk.api.entity.product.OItem;
import eleme.openapi.sdk.config.Config;
import eleme.openapi.sdk.oauth.OAuthClient;
import eleme.openapi.sdk.oauth.response.Token;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * @ Author ：drj.
 * @ Date  ：Created in 14:24 2019/1/23
 * @ Description:
 **/
@Component
public class ElmContent extends BaseContent {
    // 设置是否沙箱环境
    public boolean isSandbox = true;
    // 设置APPKEY
    public String key = "MwokprvLJp";  //可能需要修改
    // 设置APPSECRET
    public String secret = "46fdf3c7a4d8a5a1ff1b3812dc4f50994847d9a7"; //可能需要修改
    // 设置授权码
    public String authcode = "";
    // 设置回调地址
    public String redirect_url = "https://diet.lingyundata.com/order/app/elm/get_auth_code";
    // 初始化OAuthClient
    public Config config = new Config(isSandbox, key, secret);

    public OAuthClient client = new OAuthClient(config);

    public Token cash_token = null;

    public List<OItem> cash_items = new ArrayList<>();

    @Resource
    public ElmRequestService elemeRequestService;
    @Resource
    public ElmConfigService elmConfigService;
    @Resource
    public ElmOrderService elmOrderService;
    @Resource
    public FoodRelevElemeService foodRelevElemeService;
    @Resource
    public  ElmFoodDetailService elmFoodDetailService;



}
